import request from '@/utils/request'

// 创建应用分类
export function createMgAppMarketCategory(data) {
  return request({
    url: '/mg/app-market-category/create',
    method: 'post',
    data: data
  })
}

// 更新应用分类
export function updateMgAppMarketCategory(data) {
  return request({
    url: '/mg/app-market-category/update',
    method: 'put',
    data: data
  })
}

// 删除应用分类
export function deleteMgAppMarketCategory(id) {
  return request({
    url: '/mg/app-market-category/delete?id=' + id,
    method: 'delete'
  })
}

// 获得应用分类
export function getMgAppMarketCategory(id) {
  return request({
    url: '/mg/app-market-category/get?id=' + id,
    method: 'get'
  })
}

// 获得应用分类分页
export function getMgAppMarketCategoryPage(query) {
  return request({
    url: '/mg/app-market-category/page',
    method: 'get',
    params: query
  })
}

// 导出应用分类 Excel
export function exportMgAppMarketCategoryExcel(query) {
  return request({
    url: '/mg/app-market-category/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
